package com.dgut.hisystem.service.impl;


import com.dgut.hisystem.entity.Advice;
import com.dgut.hisystem.mapper.AdviceMapper;
import com.dgut.hisystem.service.AdviceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdviceServiceImpl implements AdviceService {
    @Resource
    private AdviceMapper adviceMapper;

    @Override
    public Advice getAdviceById(int id) {
        return adviceMapper.getAdviceById(id);
    }

    @Override
    public List<Advice> getAdviceByPrescription(long id){
        return adviceMapper.getAdviceByPrescription(id);
    }

    @Override
    public void insert(Advice advice) {
        adviceMapper.insert(advice);
    }

    @Override
    public void update(Advice advice) {
        adviceMapper.update(advice);
    }

    @Override
    public void delete(int id) {
        adviceMapper.delete(id);
    }
}
